Regex Criteria for User License Factor Calculations
This section describes in detail the regex criteria for calculating user license factors.
Description
The following describes the regex criteria to match customer users as licensed DirectRouting Users and to count SBC prefixes as Service/FAX numbers. The regex criteria could contain predefined placeholders or some customized values. The following placeholders can be used within the regex criteria:
■ | UmpCustomerGuidPlaceholder =UMPCUSTOMERGUID_TO_REPLACE_ |
■ | MsTenantIdPlaceholder = MSTENANTID_TO_REPLACE_ |
■ | PstnGatewayPlaceholder = _PSTNGATEWAY_TO_REPLACE_ |
In the Live Platform Customer database, the following optional settings can be added in the ApplicationSetting table:
■ | CriteriaToMatchAsLicensedUsersByGW: |
● | A customer user can be considered for Customer License if its PstnGateway match the regex specified thru CriteriaToMatchAsLicensedusersByGW setting. |
● | The default regex is “contain Site PstnGateway”: ^.*(?i)PSTNGATEWAY_TO_REPLACE.*$ |
■ | CriteriaToMatchAsDRNumbers: |
● | A SBC dial rule prefix can be considered as Service/FAX number if the rule is not considered as DirectRouting number. |
● | When the Tag match CriteriaToMatchAsDRNumbers criteria, the SBC rule will not be considered as Service/FAX number. |
● | The default value is “exact MsTenantId” or “exact UMPCustomerGuid” or “contain SitePstnGateway”: (^_MSTENANTID_TO_REPLACE_$)|(^_UMPCUSTOMERGUID_TO_REPLACE_$)|(^.*(?i)_PSTNGATEWAY_TO_REPLACE_.*$) |
■ | CriteriaToRejectAsServiceNumbers: |
● | A SBC dial rule prefix can be considered as Service/FAX number if the rule is not rejected as a Service/FAX number. |
● | When the Tag match CriteriaToRejectAsServiceNumbers criteria, the SBC rule will not be considered as Service/FAX number. |
● | No default value. |
Usage
At runtime, the placeholders from the 3 regex criteria will be replaced with the following:
■ | PstnGateway of each sbc site associated with the given tenant/customer |
■ | MsTenantId of the given tenant/customer, for Hosted customers. |
■ | UmpCustomerGuid of the given customer. |
The regex expressions are evaluated at runtime and the placeholders will be replaced with the above values. The expressions can also contain some static [hardcoded] values. The user can implement specific rules like “start with” or “end with” or “contain something”.
The order for applying the three regex criteria is as follows:
1. | Check the customer users if the OnlinePstnGateway matches CriteriaToMatchAsLicensedUsersByGW. |
2. | Check the SBC rules if they match CriteriaToMatchAsDRNumbers, and reject from license if a match exists. |
3. | Check the SBC rules if they match CriteriaToRejectAsServiceNumbers, and reject from license if a match exists. |
For a given SBC rule, if a user exists with the same LineUri, licensed as DirectRouting User, the SBC rule will no longer be licensed as a Service/FAX number; it will only be included in the total of Service/FAX numbers for license.
Examples
For a customer with a SBC Site Location with PstnGateway as 'anca.roy.com', see examples below.
CriteriaToMatchAsLicensedUsersByGW / CriteriaToMatchAsDRNumbers / CriteriaToRejectAsServiceNumbers |
User OnlinePstnGateway / SBC Rule TAG |
Licensed DirectRouting User |
Licensed Service/FAX Number |
---|---|---|---|
^.*(?i)_PSTNGATEWAY_TO_REPLACE_.*$ [contain SBC site PstnGateway] |
roy.com |
No |
Yes |
anca.roy.com |
Yes |
No |
|
Otherval.com |
No |
Yes |
|
anca.roy.com_site12 |
Yes |
No |
|
Val1anca.roy.com |
Yes |
No |
|
(?i)_PSTNGATEWAY_TO_REPLACE_$ [exact SBC site PstnGateway] |
roy.com |
No |
Yes |
anca.roy.com |
Yes |
No |
|
Otherval.com |
No |
Yes |
|
anca.roy.com_site12 |
No |
Yes |
|
Val1anca.roy.com |
No |
Yes |
|
^(?i)_PSTNGATEWAY_TO_REPLACE_.*$ [start with SBC site PstnGateway] |
roy.com |
No |
Yes |
anca.roy.com |
Yes |
No |
|
Otherval.com |
No |
Yes |
|
anca.roy.com_site12 |
Yes |
No |
|
Val1anca.roy.com |
No |
Yes |
|
^.*(?i)_PSTNGATEWAY_TO_REPLACE_$ [end with SBC site PstnGateway] |
roy.com |
No |
Yes |
anca.roy.com |
Yes |
No |
|
Otherval.com |
No |
Yes |
|
anca.roy.com_site12 |
No |
Yes |
|
Val1anca.roy.com |
Yes |
No |
|
^(?i)anca.roy.*\.com$ [start with anca.roy and end with .com] |
roy.com |
No |
Yes |
anca.roy.com |
Yes |
No |
|
Otherval.com |
No |
Yes |
|
anca.roy.com_site12 |
No |
Yes |
|
Val1anca.roy.com |
No |
Yes |